// const config=require('../configs');
let mysql = require('mysql').createPool({
  connectionLimit:10,
  host     : '115.159.62.111',
  user     : 'root',
  password : '34504192@Loock',
  database : 'APP'
});
let pool = {};
mysql.query = (sql, data) => {
    return new Promise((resolve, reject) => {
        mysql.getConnection((err, conn) => {
            if (err) throw err;
            let query = conn.query(sql, data, (serr, rows) => {
                conn.release();
                serr && reject(serr);
                resolve(rows);
            });
        });
    });
};
module.exports = mysql;